package com.homework.ch06;

public class Bus extends Automobile{
    private int num;
    public Bus(String brand,String plateNumber,int num)
    {
        super(brand,plateNumber);
        this.num=num;
    }
    @Override
    public int getRent(int day)
    {
        if(this.num>16)
        {
            setPrice(600);
        }
        else
        {
            setPrice(400);
        }
        return getPrice()*day;
    }
}
